﻿CREATE TABLE [dbo].[Role]
(
	[RoleId] INT NOT NULL PRIMARY KEY Identity, 
    [RoleName] NVARCHAR(50) NULL, 
    [DateCreated] DATETIME NOT NULL, 
    [CreatedBy] UNIQUEIDENTIFIER NOT NULL, 
    [DateUpdated] DATETIME NULL, 
    [UpdatedBy] UNIQUEIDENTIFIER NULL, 
    [IsDeleted] BIT NOT NULL DEFAULT 0,
	    CONSTRAINT [FK_Role_ToUserCreated] FOREIGN KEY ([CreatedBy]) REFERENCES [User]([UserId]),
		CONSTRAINT [FK_Role_ToUserUpdated] FOREIGN KEY ([UpdatedBy]) REFERENCES [User]([UserId])
)
